<admintpl file="header"/>
<link rel="stylesheet" href="__PUBLIC__/kindeditor-4.1.7/themes/default/default.css" />
<script charset="utf-8" src="__PUBLIC__/kindeditor-4.1.7/kindeditor-min.js"></script>
<script>
    var editor;
    var config = [
        'source', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
        'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
        'insertunorderedlist', '|', 'emoticons', 'image', 'link', 'fullscreen'];
    KindEditor.ready(function(K) {
        editor = K.create('textarea[name="description"]', {
            newlineTag:"br",
            resizeType : 1,
            allowPreviewEmoticons : false,
            items : config,
            afterBlur: function () { this.sync(); },
            cssPath:'/statics/css/backend.css',
        });
    });
</script>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="#A" data-toggle="tab">{:L('GENERAL_SETTING')}</a></li>
        <li><a href="#B" data-toggle="tab">{:L('SEO_SETTING')}</a></li>
        <!--<li><a href="#C" data-toggle="tab">{:L('TEMPLATE_SETTING')}</a></li>-->
    </ul>
    <form class="form-horizontal js-ajax-form" action="{:U('AdminTerm/add_post')}" method="post">
        <div class="tabbable">
            <div class="tab-content">
                <div class="tab-pane active" id="A">
                    <fieldset>
                        <div class="control-group">
                            <label class="control-label">{:L('PARENT')}</label>
                            <div class="controls">
                                <select name="parent">
                                    <option value="0">{:L('ROOT')}</option>
                                    {$terms_tree}
                                </select>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">{:L('NAME')}</label>
                            <div class="controls">
                                <input type="text" name="name" value=""><span class="form-required">*</span>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">英文名</label>
                            <div class="controls">
                                <input type="text" name="en_name" value="">
                            </div>
                        </div>
						<div class="control-group">
                            <label class="control-label">列表页图片尺寸提示</label>
                            <div class="controls">
                                <input type="text" name="tips" value="">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">图片</label>
                            <div class="controls">
                                <input type="hidden" name="pic" id="thumb" value="">
                                <a href="javascript:upload_one_image('图片上传','#thumb');">
                                    <img src="__TMPL__Public/assets/images/default-thumbnail.png" id="thumb-preview"
                                         width="135" style="cursor: hand"/>
                                </a>
                                <input type="button" class="btn btn-small"
                                       onclick="$('#thumb-preview').attr('src','__TMPL__Public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;"
                                       value="取消图片">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">Url规则</label>
                            <div class="controls">
                                <input type="text" name="url_rule" value="">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">分类介绍</label>
                            <div class="controls">
                                <textarea name="description" style="width:460px;height:400px;visibility:hidden;"></textarea>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">{:L('CATEGORY_TYPE')}</label>
                            <div class="controls">
                                <select name="taxonomy" onchange="showRelationCid($(this).val())">
                                    <foreach name="taxonomys" item="vo">
                                        <option value="{$key}">{$vo}</option>
                                    </foreach>
                                </select>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">是否作为导航</label>
                            <div class="controls">
                                <input type="radio" name="type" value="1"> 单页栏目 &nbsp;<input type="radio" name="type" value="0" checked="checked"> 列表栏目
                            </div>
                        </div>

                    </fieldset>
                </div>
                <div class="tab-pane" id="B">
                    <fieldset>
                        <div class="control-group">
                            <label class="control-label">{:L('SEO_TITLE')}</label>
                            <div class="controls">
                                <input type="text" name="seo_title" value="">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">{:L('SEO_KEYWORDS')}</label>
                            <div class="controls">
                                <input type="text" name="seo_keywords" value="">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">{:L('SEO_DESCRIPTION')}</label>
                            <div class="controls">
                                <textarea name="seo_description" rows="5" cols="57"></textarea>
                            </div>
                        </div>
                    </fieldset>
                </div>
                <div class="tab-pane" id="C">
                    <php>$tpl_list=sp_admin_get_tpl_file_list();</php>
                    <fieldset>
                        <div class="control-group">
                            <label class="control-label">{:L('LIST_TEMPLATE')}</label>
                            <div class="controls">
                                <php>
                                    $list_tpls=$tpl_list;
                                    unset($list_tpls['list']);
                                </php>
                                <select name="list_tpl">
                                    <option value="list">list{:C("TMPL_TEMPLATE_SUFFIX")}</option>
                                    <foreach name="list_tpls" item="vo">
                                        <option value="{$vo}">{$vo}{:C("TMPL_TEMPLATE_SUFFIX")}</option>
                                    </foreach>
                                </select>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">{:L('ARTICLE_TEMPLATE')}</label>
                            <div class="controls">
                                <php>
                                    $article_tpls=$tpl_list;
                                    unset($article_tpls['article']);
                                </php>
                                <select name="one_tpl">
                                    <option value="article">article{:C("TMPL_TEMPLATE_SUFFIX")}</option>
                                    <foreach name="article_tpls" item="vo">
                                        <option value="{$vo}">{$vo}{:C("TMPL_TEMPLATE_SUFFIX")}</option>
                                    </foreach>
                                </select>
                            </div>
                        </div>
                    </fieldset>
                </div>
            </div>
        </div>
        <div class="form-actions">
            <button class="btn btn-primary js-ajax-submit" type="submit">{:L('ADD')}</button>
            <a class="btn" href="javascript:history.back(-1);">{:L('BACK')}</a>
        </div>
    </form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
</body>
</html>